﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevComponents.DotNetBar;

namespace WindowsFormsApplication1
{
    public partial class MainscreenDotnetbar : OfficeForm
    {
        public MainscreenDotnetbar()
        {
            InitializeComponent();
        }

        private void MainscreenDotnetbar_Load(object sender, EventArgs e)
        {
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.BackColor = ColorTranslator.FromHtml("#3A3A48");
            int width_form = this.Width;
            btnWelcome.Width = width_form / 6;
            btnWelcome.Font = new Font("Tahoma", btnWelcome.Height / 6);

            btnStatistics.Width = width_form / 6;
            btnStatistics.Font = new Font("Tahoma", btnStatistics.Height / 6);

            btnExit.Width = width_form / 6;
            btnExit.Font = new Font("Tahoma", btnWelcome.Height / 6);

            btnTrade.Width = width_form / 6;
            btnTrade.Font = new Font("Tahoma", btnTrade.Height / 6);

            btnMenu.Width = width_form / 6;
            btnMenu.Font = new Font("Tahoma", btnMenu.Height / 6);

            btnOption.Width = width_form / 6;
            btnOption.Font = new Font("Tahoma", btnOption.Height / 6);
        }

        private void btnTrade_Click(object sender, EventArgs e)
        {
            ManageTables form_manage_tables = new ManageTables();
            form_manage_tables.MdiParent = this;
            form_manage_tables.Show();
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void MainscreenDotnetbar_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (MessageBox.Show("Bạn có chắc muốn đóng chương trình?",
                       "CẢNH BÁO",
                        MessageBoxButtons.YesNo,
                        MessageBoxIcon.Warning) == DialogResult.No)
            {
                e.Cancel = true;
            }
        }
    }
}
